cmake_minimum_required(VERSION 3.10)

# 1.查找当前目录下的所有源文件
file(GLOB UTILS_SOURCES CONFIGURE_DEPENDS "*.cc")

# 2.编译成静态库
add_library(work_utils STATIC ${UTILS_SOURCES})

# 3.给子模块添加work模块的头文件路径
target_include_directories(work_utils PUBLIC
    ${PROJECT_SOURCE_DIR}/work/include
)

# 4.增加对顶层全局工具函数的依赖
target_link_libraries(work_utils PUBLIC utils)

# 5.打印调试信息
message(STATUS "work_utils module finish.")